<?php

/**
 * @Author: zhibinm (113664000@qq.com)
 * @Date:   2018-04-10 10:23:33 
 * @Copyright:   xuebingsi
 * @Last Modified by:   Zhibinm
 * @Last Modified time: 2018-04-10 11:21:39
 */
$city  = "广州";
$city1 = "东莞";

$arr = array(56,54,6,54,645,6,456,45,60);

$arr = [56,54,6,54,645,6,456,45,60];

$sum = 0;

foreach ($arr as $v) {
	$sum +=$v;
}

echo $sum;

exit;

$arr[count($arr)] = 90;

$arr[] = 90;

$arr = [];

$arr[9] = 9090;

$sum = 0;

for ($i=0; $i <count($arr) ; $i++) { 
	$sum += $arr[$i];
}

echo $sum;

// $arr = ['广州','东莞',true];

// $arr[8]='xuebingsi';

// var_dump($arr[5]);


$arr = [345,3435,3645,334545,3845];

// 索引数组

$max = $arr[0];

for ($i=0; $i <count($arr) ; $i++) { 
	if($arr[$i]>$max){
		$max = $arr[$i];
	}
}

foreach ($arr as  $v) {

	if($v>$max){
		$max = $v;
	}
}

echo $max;


// 多维数组
$arr = [435,34,5,345,34,[546,45,64,56,456],45]